import React, { Component } from 'react';
import logo from './logo.svg';
import Dianzan from './dianzan';
import './App.css';



class App extends Component {
  getNum() {
    return Math.random() * 10;
  }

  clickEvent(words,e) {
    console.log(e.target);
    console.log(this);
    console.log(words);
  }
  render() {
    return (
      <div className="App">
        <header className="App-header">
          <img src={logo} className="App-logo" alt="logo" />
          <h1 className="App-title">Welcome to React</h1>
        </header>
        <p className="App-intro" >
          To get started, edit <code>src/App.js</code> and save to reload
          {this.getNum() > 5 ? <span>超过5了，是{this.getNum()}</span> : <b>小于5，为{this.getNum()}</b>}
          <button onClick={this.clickEvent.bind(this,"这是王雷的测试!!!")}>点击我</button>
        </p>

        <Dianzan />
      </div>
    );
  }
}

export default App;
